#ifndef unigame_ImageReader_h
#define unigame_ImageReader_h

#include "config/Def.h"

namespace unigame
{
	class ImageReader
	{
	public:
		ImageReader(char* fileData, uint32 len):m_fileData(fileData), m_data(0), m_palette(0), m_fileDataLen(len){}
		virtual ~ImageReader()
		{
			uni_delete_array(m_data);
			uni_delete_array(m_palette);
		}
	
		virtual bool read(){return false;}

		int16 width()
		{
			return m_width;
		}

		int16 height()
		{
			return m_height;
		}

		char* data()
		{
			return m_data;
		}

	protected:
		int16 m_width;
		int16 m_height;
		int32* m_palette;
		uint32 m_fileDataLen;
		char* m_data;
		char* m_fileData;

	};
}

#endif